package leetcode.秋招.爱奇艺;

        import java.math.BigDecimal;
        import java.text.DecimalFormat;
        import java.util.Scanner;

/**
 * @author ：zsy
 * @date ：Created 2021/8/1 14:45
 * @description：
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String ss[] = in.nextLine().split(",");
        int n = ss.length;
        int nums[] = new int[n];
        for (int i = 0; i < n - 1; i++) {
            nums[i] = Integer.parseInt(ss[i]);
        }
        nums[n - 1] = ss[n - 1].charAt(0) - '0';
        int k = ss[n - 1].charAt(2) - '0';
        int i = 0, j = 0;
        int sum = 0;
        double avg1 = 0.0;
        double res = 0;
        while (j < n) {
            sum += nums[j];
            if (j - i == k - 1 && 1.0 * sum / k > avg1 && avg1 != 0.0) {
                res = Math.max(res, (1.0 * sum / k - avg1) / avg1);
            }
            j++;
            avg1 = 1.0 * sum / k;
            while (j - i >= k) {
                sum -= nums[i++];
            }
        }
        String s = String.valueOf(res);
        DecimalFormat df = new DecimalFormat("0.00%");
        BigDecimal bigDecimal = new BigDecimal(s);
        System.out.println(df.format(bigDecimal));
    }
}
